<?php

class Provinsi extends \Eloquent {

	// Add your validation rules here
	public static $rules = [
		'nama' => 'required',
		'keterangan' => 'required',
	];

	// Don't forget to fill this array
	protected $fillable = ["nama","keterangan","is_active","user_id","ref_id","action"];

	public function scopeActive($query) {
        return $query->where('is_active', '=', '1');
    }

    public function kabupatens()
    {
    	return $this->hasMany('Kabupaten');
    }
}